const axios = require("axios")
const cheerio = require('cheerio');
module.exports = {
    async getList(res, resp) {
        let { data: list } = await axios({ url: "https://www.135editor.com/editor_styles/styles?inajax=1&team_id=0&page=2&free=0&black=0&fav=recommend&filter=&sort=", method: "GET" })
        
        const $ = cheerio.load(list);
        let lis = $("ul.editor-template-list li")
        let TEMP_result=[]
        for(let i=0;i<lis.length;i++){
            let temp=$(lis[i])
            temp.find(".btn").remove()
            temp.find(".vip-flag").remove()
            TEMP_result.push(temp.html().replaceAll("135编辑器","软件传媒编辑器").replaceAll("_135editor","_rjcmeditor").trim())
        }
        resp.send(TEMP_result)
    }
}